package com.kingmed.kmss.admin.modules.ums.model;

import com.baomidou.mybatisplus.annotation.*;
import com.kingmed.kmss.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 后台资源表（删掉）
 * </p>
 */
@Data
@TableName("ums_resource")
@ApiModel(value = "UmsResource对象", description = "后台资源表")
public class UmsResource extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("资源编码")
    @NotEmpty
    private String code;

    @ApiModelProperty("资源名称")
    private String name;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("菜单ID")
    @NotNull
    private Long menuId;

    @ApiModelProperty("菜单名称")
    private String menuName;

    @ApiModelProperty("删除标记")
    @TableField
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;
}
